package com.hlg.xboot.listener;

import com.hlg.xboot.event.BaseEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;


/**
 * <p>Description:事件监听器</p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company: HLG</p>
 * <p>Site: www.hlgroup.com</p>
 *
 * @author tianzw
 * @version 1.0
 * @date 2017/07/09
 */
@Component
public class EventListener implements ApplicationListener<BaseEvent> {

    @Async
    @Override
    public void onApplicationEvent(BaseEvent baseEvent) {
        baseEvent.handleEvent();
    }
}
